﻿using System;
using System.Runtime;

namespace M2Server
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            GCSettings.LatencyMode = GCSettings.IsServerGC ? GCLatencyMode.Batch : GCLatencyMode.Interactive;

            GameServer server = new GameServer();
            server.Run();

            while (true)
            {
                var line = Console.ReadLine();
                if (string.IsNullOrEmpty(line))
                {
                    continue;
                }
                switch (line)
                {
                    case  "info":
                        M2Share.CommandSystem.ExecCmd("serverInfo");
                        break;
                }
            }
        }
    }
}